Electronic device and method for diagnosing vehicle

ABSTRACT

According to various embodiments, an electronic device comprises: at least one communication circuit configured to provide communication with a vehicle device or an external electronic device; at least one processor electrically connected to the at least one communication circuit; and a memory electrically connected to the at least one processor, wherein, the memory, when executed, can store instructions configured such that the at least one processor acquires and stores first information related to a vehicle device when connected to the vehicle device, acquires second information related to the vehicle device when the electronic device satisfies specified conditions, determines the state of the vehicle device on the basis of the first information and the second information, and performs a designated operation on the basis of the determination. In addition, other embodiments are possible.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation of U.S. Pat. application Serial No.16/980,895, filed on Sep. 15, 2020 and assigned Patent No. 11,645,878issued on May 9, 2023, which is a continuation of PCT InternationalApplication No. PCT/KR2019/003699, filed on Mar. 29, 2019, which claimspriority to Korean Patent Application No. 10-2018-0038226, filed on Apr.2, 2018 in the Korean Intellectual Property Office, the disclosures ofwhich are herein incorporated by reference.

TECHNICAL FIELD

Various embodiments relate to an electronic device and a method fordiagnosing a vehicle.

BACKGROUND ART

An OBD (on-board diagnostics) is a device which enables a driver or amechanic to check and inspect whether or not a vehicle is abnormal bylighting a malfunction indication lamp (MIL) on an instrument panel in acase that a problem occurs in the vehicle.

Examples of an OBD include OBD-I and OBD-II. OBD-I determines a failuredue to disconnection/short-circuit of various input or output sensorsconnected to an engine control unit (ECU), and OBD-II diagnosesrationality and performance of a sensor and whether or not a system isnormal as well as a disconnection/short-circuit.

Such an OBD is mounted to the front dashboard side of a currentlyreleased vehicle. Since an OBD may be mounted to a vehicle and performself-diagnosis of the vehicle, a vehicle repair company or a vehicleinsurance company can usefully use an OBD. In addition, an OBD enables adriver’s driving habits to be determined, so that the driver can fix thedriving habits or safely drive a vehicle, based on feedback provided bythe OBD.

An OBD may acquire vehicle state information from an ECU of a vehicle.For example, an ECU, which monitors vehicle information through aplurality of sensors in a vehicle, performs communication with anexternal device of the vehicle, and through such communication, an OBDmay acquire, from the ECU, vehicle state information such as vehiclefuel efficiency, revolutions per minute (RPM), a speed, a fuel usagestatus, a vehicle accident or failure, a battery and consumable status,and a driving time.

DETAILED DESCRIPTION OF THE INVENTION Technical Problem

The number of ECUs in a vehicle continuously increases with thedevelopment of the vehicle, and ECUs are developed differently fordifferent vehicle versions (different engines or transmissions, variousoptions, nationally different versions country by country, and thelike). As the number of ECUs mounted to a vehicle increases, the risksdue to illegal tuning or mounting of ECUs are increasing. Accordingly,there is a demand for a measure of detecting the state of an ECU mountedto a vehicle.

According to various embodiments, an electronic device and a method fordiagnosing a vehicle, by which safety of the vehicle may be determinedusing information acquired from the vehicle, may be provided.

Technical Solution

According to various embodiments, an electronic device may include: atleast one communication circuit configured to provide communication witha vehicle device or an external electronic device; at least oneprocessor electrically connected to the at least one communicationcircuit; and a memory electrically connected to the at least oneprocessor, wherein the memory stores instructions configured to causethe at least one processor, when executed, to: when connected to thevehicle device, acquire and store first information related to thevehicle device; in a case that the electronic device satisfies adesignated condition, acquire second information related to the vehicledevice from the vehicle device; based on the first information and thesecond information, determine the state of the vehicle device; and basedon the determination, perform a designated operation.

According to various embodiments, an electronic device may include: atleast one communication circuit configured to provide communication witha vehicle device or a first external electronic device; at least oneprocessor electrically connected to the at least one communicationcircuit; and a memory electrically connected to the at least oneprocessor, wherein the memory stores instructions configured to causethe at least one processor, when executed, to: when connected to thevehicle device, acquire first information related to the vehicle devicethrough the at least one communication circuit; transmit at least a partof the first information to the first external electronic device throughthe at least one communication circuit; in a case that the electronicdevice satisfies a designated condition, acquire second informationrelated to the vehicle device from the vehicle device through the atleast one communication circuit; transmit at least a part of the secondinformation to the first external electronic device through the at leastone communication circuit; and in response to transmission of the firstinformation and the second information, receive, through the at leastone communication circuit, information related to the state of thevehicle device determined by the external electronic device from thefirst external electronic device, and perform, based on the receivedinformation, a designated operation.

According to various embodiments, in a storage medium whichnon-transitorily stores instructions, when executed by at least onecircuit, the instructions may be configured to cause the at least onecircuit to perform at least one operation, and the at least oneoperation may include: when an electronic device and a vehicle deviceare connected, acquiring and storing first information related to thevehicle device; in a case that the electronic device satisfies adesignated condition, acquiring second information related to thevehicle device from the vehicle device; based on the first informationand the second information, determining the state of the vehicle device;and based on the determination, performing a designated operation.

Advantageous Effects

In various embodiments, an electronic device and a method for diagnosinga vehicle, by which safety of the vehicle may be determined usinginformation acquired from the vehicle, is provided, thereby preventingan illegal tuning or mounting situation of an ECU mounted to thevehicle.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of an electronic device in a networkenvironment, according to various embodiments.

FIG. 2 shows a system in which an electronic device performscommunication connection with a vehicle device and an externalelectronic device, according to various embodiments.

FIG. 3 is a block diagram illustrating the structure of an electronicdevice, according to various embodiments.

FIG. 4 is a flowchart for describing an operation in which an electronicdevice determines the state of a vehicle device, according to variousembodiments.

FIG. 5 is a flowchart for describing an operation in which an electronicdevice and an external electronic device determine the state of avehicle device, according to various embodiments.

FIG. 6 is a flowchart for describing an operation in which an electronicdevice and an external electronic device determine the state of avehicle device, according to various embodiments.

FIG. 7 is a flowchart for describing an operation in which an electronicdevice and an external electronic device determine the state of avehicle device, according to various embodiments.

FIG. 8 is a flowchart for describing an operation in which an electronicdevice and an external electronic device determine the state of avehicle device, according to various embodiments.

FIG. 9 is a flowchart for describing an operation in which an electronicdevice determines the state of a vehicle device, according to variousembodiments.

FIG. 10 is a flowchart for describing an operation in which anelectronic device and an external electronic device determine the stateof a vehicle device, according to various embodiments.

MODE FOR CARRYING OUT THE INVENTION

FIG. 1 is a block diagram illustrating an electronic device 101 in anetwork environment 100 according to various embodiments. Referring toFIG. 1 , the electronic device 101 in the network environment 100 maycommunicate with an electronic device 102 via a first network 198 (e.g.,a short-range wireless communication network), or an electronic device104 or a server 108 via a second network 199 (e.g., a long-rangewireless communication network). According to an embodiment, theelectronic device 101 may communicate with the electronic device 104 viathe server 108. According to an embodiment, the electronic device 101may include a processor 120, memory 130, an input device 150, a soundoutput device 155, a display device 160, an audio module 170, a sensormodule 176, an interface 177, a haptic module 179, a camera module 180,a power management module 188, a battery 189, a communication module190, a subscriber identification module (SIM) 196, or an antenna module197. In some embodiments, at least one (e.g., the display device 160 orthe camera module 180) of the components may be omitted from theelectronic device 101, or one or more other components may be added inthe electronic device 101. In some embodiments, some of the componentsmay be implemented as single integrated circuitry. For example, thesensor module 176 (e.g., a fingerprint sensor, an iris sensor, or anilluminance sensor) may be implemented as embedded in the display device160 (e.g., a display).

The processor 120 may execute, for example, software (e.g., a program140) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 101 coupled with theprocessor 120, and may perform various data processing or computation.According to one embodiment, as at least part of the data processing orcomputation, the processor 120 may load a command or data received fromanother component (e.g., the sensor module 176 or the communicationmodule 190) in volatile memory 132, process the command or the datastored in the volatile memory 132, and store resulting data innon-volatile memory 134. According to an embodiment, the processor 120may include a main processor 121 (e.g., a central processing unit (CPU)or an application processor (AP)), and an auxiliary processor 123 (e.g.,a graphics processing unit (GPU), an image signal processor (ISP), asensor hub processor, or a communication processor (CP)) that isoperable independently from, or in conjunction with, the main processor121. Additionally or alternatively, the auxiliary processor 123 may beadapted to consume less power than the main processor 121, or to bespecific to a specified function. The auxiliary processor 123 may beimplemented as separate from, or as part of the main processor 121.

The auxiliary processor 123 may control, for example, at least some offunctions or states related to at least one component (e.g., the displaydevice 160, the sensor module 176, or the communication module 190)among the components of the electronic device 101, instead of the mainprocessor 121 while the main processor 121 is in an inactive (e.g.,sleep) state, or together with the main processor 121 while the mainprocessor 121 is in an active (e.g., executing an application) state.According to an embodiment, the auxiliary processor 123 (e.g., an imagesignal processor or a communication processor) may be implemented aspart of another component (e.g., the camera module 180 or thecommunication module 190) functionally related to the auxiliaryprocessor 123.

The memory 130 may store various data used by at least one component(e.g., the processor 120 or the sensor module 176) of the electronicdevice 101. The various data may include, for example, software (e.g.,the program 140) and input data or output data for a command relatedthereto. The memory 130 may include the volatile memory 132 or thenon-volatile memory 134.

The program 140 may be stored in the memory 130 as software, and mayinclude, for example, an operating system (OS) 142, middleware 144, oran application 146.

The input device 150 may receive a command or data to be used by acomponent (e.g., the processor 120) of the electronic device 101, fromthe outside (e.g., a user) of the electronic device 101. The inputdevice 150 may include, for example, a microphone, a mouse, or akeyboard.

The sound output device 155 may output sound signals to the outside ofthe electronic device 101. The sound output device 155 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or playing record, and the receivermay be used for incoming calls. According to an embodiment, the receivermay be implemented as separate from, or as part of the speaker.

The display device 160 may visually provide information to the outside(e.g., a user) of the electronic device 101. The display device 160 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. According to an embodiment, the displaydevice 160 may include touch circuitry adapted to detect a touch, orsensor circuitry (e.g., a pressure sensor) adapted to measure theintensity of force incurred by the touch.

The audio module 170 may convert a sound into an electrical signal andvice versa. According to an embodiment, the audio module 170 may obtainthe sound via the input device 150, or output the sound via the soundoutput device 155 or an external electronic device (e.g., an electronicdevice 102 (e.g., a speaker or a headphone)) directly or wirelesslycoupled with the electronic device 101.

The sensor module 176 may detect an operational state (e.g., power ortemperature) of the electronic device 101 or an environmental state(e.g., a state of a user) external to the electronic device 101, andthen generate an electrical signal or data value corresponding to thedetected state. According to an embodiment, the sensor module 176 mayinclude, for example, a gesture sensor, a gyro sensor, an atmosphericpressure sensor, a magnetic sensor, an acceleration sensor, a gripsensor, a proximity sensor, a color sensor, an infrared (IR) sensor, abiometric sensor, a temperature sensor, a humidity sensor, or anilluminance sensor.

The interface 177 may support one or more specified protocols to be usedfor the electronic device 101 to be coupled with the external electronicdevice (e.g., the electronic device 102) directly or wirelessly.According to an embodiment, the interface 177 may include, for example,a high definition multimedia interface (HDMI), a universal serial bus(USB) interface, a secure digital (SD) card interface, or an audiointerface.

A connecting terminal 178 may include a connector via which theelectronic device 101 may be physically connected with the externalelectronic device (e.g., the electronic device 102). According to anembodiment, the connecting terminal 178 may include, for example, a HDMIconnector, a USB connector, a SD card connector, or an audio connector(e.g., a headphone connector).

The haptic module 179 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or electrical stimulus whichmay be recognized by a user via his tactile sensation or kinestheticsensation. According to an embodiment, the haptic module 179 mayinclude, for example, a motor, a piezoelectric element, or an electricstimulator.

The camera module 180 may capture a still image or moving images.According to an embodiment, the camera module 180 may include one ormore lenses, image sensors, image signal processors, or flashes.

The power management module 188 may manage power supplied to theelectronic device 101. According to one embodiment, the power managementmodule 188 may be implemented as at least part of, for example, a powermanagement integrated circuit (PMIC).

The battery 189 may supply power to at least one component of theelectronic device 101. According to an embodiment, the battery 189 mayinclude, for example, a primary cell which is not rechargeable, asecondary cell which is rechargeable, or a fuel cell.

The communication module 190 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 101 and the external electronic device (e.g., theelectronic device 102, the electronic device 104, or the server 108) andperforming communication via the established communication channel. Thecommunication module 190 may include one or more communicationprocessors that are operable independently from the processor 120 (e.g.,the application processor (AP)) and supports a direct (e.g., wired)communication or a wireless communication. According to an embodiment,the communication module 190 may include a wireless communication module192 (e.g., a cellular communication module, a short-range wirelesscommunication module, or a global navigation satellite system (GNSS)communication module) or a wired communication module 194 (e.g., a localarea network (LAN) communication module or a power line communication(PLC) module). A corresponding one of these communication modules maycommunicate with the external electronic device via the first network198 (e.g., a short-range communication network, such as Bluetooth™,wireless-fidelity (Wi-Fi) direct, or infrared data association (IrDA))or the second network 199 (e.g., a long-range communication network,such as a cellular network, the Internet, or a computer network (e.g.,LAN or wide area network (WAN)). These various types of communicationmodules may be implemented as a single component (e.g., a single chip),or may be implemented as multi components (e.g., multi chips) separatefrom each other. The wireless communication module 192 may identify andauthenticate the electronic device 101 in a communication network, suchas the first network 198 or the second network 199, using subscriberinformation (e.g., international mobile subscriber identity (IMSI))stored in the subscriber identification module 196.

The antenna module 197 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 101. According to an embodiment, the antenna module197 may include a plurality of antennas. In such a case, at least oneantenna appropriate for a communication scheme used in the communicationnetwork, such as the first network 198 or the second network 199, may beselected, for example, by the communication module 190 from theplurality of antennas. The signal or the power may then be transmittedor received between the communication module 190 and the externalelectronic device via the selected at least one antenna.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI)).

According to an embodiment, commands or data may be transmitted orreceived between the electronic device 101 and the external electronicdevice 104 via the server 108 coupled with the second network 199. Eachof the electronic devices 102 and 104 may be a device of a same type as,or a different type, from the electronic device 101. According to anembodiment, all or some of operations to be executed at the electronicdevice 101 may be executed at one or more of the external electronicdevices 102, 104, or 108. For example, if the electronic device 101should perform a function or a service automatically, or in response toa request from a user or another device, the electronic device 101,instead of, or in addition to, executing the function or the service,may request the one or more external electronic devices to perform atleast part of the function or the service. The one or more externalelectronic devices receiving the request may perform the at least partof the function or the service requested, or an additional function oran additional service related to the request, and transfer an outcome ofthe performing to the electronic device 101. The electronic device 101may provide the outcome, with or without further processing of theoutcome, as at least part of a reply to the request. To that end, acloud computing, distributed computing, or client-server computingtechnology may be used, for example.

FIG. 2 shows a system 200 in which an electronic device performscommunication connection with a vehicle device and an externalelectronic device, according to various embodiments.

Referring to FIG. 2 , a system 200 may include an electronic device 101(for example: an electronic device 101 of FIG. 1 ), a vehicle device 201embedded in a vehicle 20, a first external electronic device 210 a (forexample: a server 108 of FIG. 1 ), a second external electronic device210 b (for example: the server 108 of FIG. 1 ), and a third externalelectronic device 210 c (for example: an electronic device 102 or 104 ofFIG. 1 ).

In FIG. 2 , an electronic device 101 according to various embodimentsmay be connected to a vehicle device 201 embedded in a vehicle 20 toacquire information related to the vehicle 20 while performingcommunication, or may control the function of the vehicle (20) throughthe vehicle device 201. An electronic device 101 may include an OBDdevice based on an on-board diagnostics (OBD) protocol, for example,implemented by omitting at least one (for example: a display device 160or a camera module 180) among components of an electronic device 101 ofFIG. 1 or by adding one or more other components (for example: a secondcommunication module 392).

An electronic device 101 may be electrically connected to a vehicledevice 201 to acquire state information of a vehicle 20 from the vehicledevice 201. The state information may include, for example, not onlyinformation on a driving state of the vehicle 20, such as a speed, adriving time, engine revolutions per minute (RPM), a driving distance,average fuel economy, or instantaneous fuel economy, but alsoinformation on an engine state, such as a cooling water temperature, anintake air temperature, an intake air amount, an engine oil temperature,a mission oil temperature, a fuel injection amount, an oxygen sensorvoltage, an ignition angle, a carbon discharge amount, or an air-fuelratio learning amount, a brake state, a battery voltage or currentamount, air conditioner coolant pressure, or the like. In addition, in acase that a problem occurs in a vehicle 20, an electronic device 101 mayconfirm, based on state information of the vehicle 20 acquired from avehicle device 201, information on a problem occurring in the vehicle20.

In FIG. 2 , a vehicle device 20 according to various embodiments mayinclude at least one engine control unit (ECU) embedded in a vehicle 20to electronically control various functions related to driving of thevehicle 20, and the like. An ECU may be a system which has an electronicdevice 101 mounted thereto and supports overall driving functioncontrols of a vehicle 20, and may electronically support, for example,various controls such as a discharge gas control, an engine control, alight control, and a brush control. In addition, an ECU may include avehicle connector (for example: an OBD terminal, an OBD connector, orthe like) for connection to an electronic device 101. A vehicleconnector may be provided in at least one shape among various shapes soas to be coupled to a connector of an electronic device 101.

In FIG. 2 , a first external electronic device 210 a, a second externalelectronic device 210 b, and a third external electronic device 210 caccording to various embodiments may be an electronic device 101, anelectronic device 102, an electronic device 104, or a server 108illustrated in FIG. 1 . A first external electronic device 210 a, asecond external electronic device 210 b, and a third external electronicdevice 210 c may be devices which transmit data to an electronic device101 connected to a vehicle device 201, or which acquire data from theelectronic device 101. The first external electronic device 210 a, thesecond external electronic device 210 b, and the third externalelectronic device 210 c may include, for example, at least one among aportable communication devices (for example: a smart phone), a computerdevice, a portable multimedia device, a portable medical device, acamera, a wearable device, a server, and a cloud server.

A first external electronic device 210 a (for example: a server 108 ofFIG. 1 ) may communicate with an electronic device 101 through a network199 (for example: a remote wireless communication network). For example,a first external electronic device 210 a may be an automobile companyserver, and when vehicle information (for example: a vehicleidentification number (VIN)) related to a vehicle 20 is received from anelectronic device 101, information related to the vehicle 20corresponding to the vehicle information may be provided to theelectronic device 101. For example, a first external electronic device210 a may provide ECU ID list information corresponding to vehicleinformation, provide vehicle battery average consumption amountinformation, provide confirmation of an ECU firmware version, or provideconfirmation of vehicle safe limit configuration.

A second external electronic device 210 b (for example: a server 108 ofFIG. 1 ) may communicate with an electronic device 101 through a network199. For example, a second external electronic device 210 b may be aservice company server (for example: an insurance company or a rentalcar or certification company), and may receive, from an electronicdevice 101, notification of whether or not the state of a vehicle device201 is abnormal, or provide authentication processing for attestation ofthe vehicle device 201.

A third external electronic device 210 c (for example: an electronicdevice 102 or an electronic device 104 of FIG. 1 ) may communicate withan electronic device 101 through a local area network 198 (for example:a local area wireless communication network) or a network 199. Forexample, a third external electronic device 210 c may be a portableterminal of a user, and may receive, from an electronic device 101,notification of whether or not a vehicle device 201 is in an abnormalstate, or transmit, to an electronic device 101, instruction datarelated to the vehicle device 201. For example, instruction data may bedivided into generic instruction data and enhancement instruction data.Generic instruction data may be, for example, instruction dataconforming to an OBD-II protocol. In addition, enhancement instructiondata may be, for example, instruction data conforming to a formatspecified according to a manufacturer of an electronic device 101 or atype of a vehicle 20. As another example, a type of instruction data maybe divided into control instruction data and acquisition instructiondata. Control instruction data is instruction data for controlling avehicle 20, and may include write instruction data, actuationinstruction data, and the like. Acquisition instruction data may includeread instruction data as instruction data for acquiring stateinformation of a vehicle 20.

Specifically, control instruction data may include instruction data forlocking or unlocking a door of a vehicle 20, instruction data forlocking or unlocking a window of a vehicle 20, instruction data forturning on or off a hazard lamp of a vehicle 20, instruction data forturning on or off a right or left lamp of a vehicle 20, instruction datafor sounding a horn of a vehicle 20, instruction data for opening orclosing a trunk of a vehicle 20, instruction data for driving a brake ofa vehicle 20, instruction data for driving an accelerator pedal of avehicle 20, and the like.

In addition, acquisition instruction data may include instruction datafor acquiring the number of key codings of a vehicle 20, instructiondata for acquiring the amount of engine oil in a vehicle 20, instructiondata for acquiring a state of whether or not a seat belt of a vehicle 20is worn, instruction data for acquiring a battery life or a batteryresidual amount of a vehicle 20, instruction data for acquiring a lightstate of a lamp of a vehicle 20, instruction data for acquiring a gearstate of a vehicle 20, instruction data for acquiring a steering wheelangle of a vehicle 20, instruction data for acquiring a brake state of avehicle 20, instruction data for acquiring a speed of a vehicle 20,instruction data for acquiring engine revolutions per minute of avehicle 20, and the like. According to various embodiments, acquisitioninstruction data may include instruction data for acquiring an ECU IDand firmware version of a vehicle device 201, safe limit configurationinformation and current consumption amounts of a vehicle 20, and amonitoring value of a broadcasting message between ECUs, and anelectronic device 101 may acquire information for determiningabnormality of the state of a vehicle device 201 by using theacquisition instruction data.

FIG. 3 is a block diagram 300 illustrating the structure of anelectronic device, according to various embodiments.

Referring to FIG. 3 , an electronic device 101 according to variousembodiments may have at least a part of or the same configuration as anelectronic device 101 of FIG. 1 , and may include an OBD device based onan on-board diagnostics (OBD) protocol, for example, implemented byomitting at least one (for example: a display device 160 or a cameramodule 180) among components or by adding one or more other components(for example: a second communication module 392). An electronic device101 may include a processor 320 (for example: a processor 120 of FIG. 1), a first communication module 391 (for example: a communication module190 of FIG. 1 ), a second communication module 392 (for example: avehicle communication module), a sensor module 340 (for example: asensor module 176 of FIG. 1 ), and a memory 330 (for example: a memory130 of FIG. 1 ). A processor 320 may include a first processor 321 and asecond processor 322. In addition, an electronic device 101 may furtherinclude an audio processor (not shown) having a microphone and aspeaker, a touch pad (not shown) for a touch-based input, an input unit(not shown) supporting a physical key input, a displayer (not shown) fordisplaying screen data according to an operation of an electronic device101, a light emitter (not shown) including an LED or the like, a battery(not shown) for supplying power to the above-described components, andthe like.

A first communication module 391 and a second communication module 392may perform communication with a vehicle device 201 and an externalelectronic device (for example: first to third external electronicdevices 210 a, 210 b, and 210 c of FIG. 2 , hereinafter, collectivelyreferred to as 210) in a wired or wireless communication manner.

A first communication module 391 and a second communication module 392may be divided according to the purpose, function, or configurationthereof. For example, a first communication module 391 may communicatewith an external electronic device 210, and a second communicationmodule 392 may be divided to perform communication with a vehicle device201. In addition, a first communication module 391 may performcommunication in a wireless communication manner, and a secondcommunication module 392 may be divided to perform communication in awired communication manner.

A first communication module 391 may communicate with an externalelectronic device 210 in a wireless communication manner. A firstcommunication module 391 may include, for example, a Wi-Fi module 391 a,a Bluetooth module 391 b, and a cellular communication module 391 c.

An electronic device 101 may wirelessly communicate with an externalelectronic device 210 (for example: an external servers 210 a or 210 b)by using a cellular communication module 391 c. A cellular communicationmodule 391 c may perform communication according to communicationstandards, for example, IEEE, 3rd generation (3G), 3rd generationpartnership project (3GPP), long term evolution (LTE), and the like.

In addition, an electronic device 101 may perform short-range wirelesscommunication with an external electronic device 210 (for example: amobile device 210 c) by using a Wi-Fi module 391 a or a Bluetooth module391 b.

A second communication module 392 may communicate with a vehicle device201 in a wired communication manner. A second communication module 392may include, for example, a K-Line communication module 392 a, an RS-232communication module 392 b, and a CAN communication module 392 c. Inaddition, a second communication module 392 may include a CAN FDcommunication module, an MOST communication module, an LIN communicationmodule, an Ethernet communication module, a KWP2000 communicationmodule, an ISO 9141 communication module, a PWN communication module, aVPM communication module, a UDS communication module, and the like.

A sensor module 340 may be composed of various sensors for detecting thestate of an electronic device 101 and the state of a vehicle 20. Forexample, a sensor module 340 may include at least one sensor among anacceleration sensor, a gyro sensor, an illumination sensor, a proximitysensor, a pressure sensor, a noise sensor (for example: a microphone), avideo sensor (for example: a camera module), a temperature sensor, animpact sensor (a shock sensor), and a timer.

A sensor module 340 may detect, as a state value of a vehicle 20, atleast one of an amount of remaining power in a battery of a vehicle 20,a temperature of a vehicle 20, a moving speed of a vehicle 20, whetheror not a vehicle 20 is impacted, and acceleration of a vehicle (20). Inaddition, a sensor module 340 may detect, as state information of anelectronic device 101, at least one among the temperature, batteryremaining amount, and operation state of the electronic device 101.

A memory 330 may store various sorts of software and data executed andprocessed by an electronic device 101 and include at least one among anon-volatile memory (for example: a non-volatile memory 134 of FIG. 1 )and a volatile memory (for example: a volatile memory 132 of FIG. 1 ).For example, a memory 330 may store state information acquired from avehicle device 201 and information related to a vehicle, acquired froman external electronic device 210. In addition, a memory 330 may store alist of external devices which may transmit data to a vehicle device 201or a list of external devices which may refuse transmission.

A processor 320 may control an overall operation of an electronic device101. A processor 320 may include a first processor 321 and a secondprocessor 322. A first processor 321 and a second processor 322 maycontrol an operation of an electronic device 101 and may be dividedaccording to the purpose, function, or configuration thereof.

A first processor 321 may be an application processor (AP) (for example:an MSM8916 AP or the like) or the like for driving an applicationprogram or an operating system (for example: an Android OS or a TizenOS). A first processor 321 may include an OBD control module 321 a forcommunicating with a second processor 322. In addition, a firstprocessor 321 may include an OBD determination module 321 b forrequesting information related to a vehicle device 201 from the vehicledevice 201, acquiring information received from the vehicle device 201in response to the request, and determining, based on the acquiredinformation, the state of the vehicle device 201.

A second processor 322 may be a micro controller unit (MCU) forperforming self-diagnosis of a vehicle device 201 (for example, an OBD-Ior OBD-II MCU or the like). A second processor 322 may convert a firstformat of a request received from a first processor 321 into a differentsecond format (for example: a CAN communication format, a KWP2000communication format, or the like) transmittable to a vehicle device201. In addition, a second processor 322 may convert a second format ofinformation received from a vehicle device 201 into a first formattransmittable to a first processor 321.

A first processor 321 and a second processor 322 may transmit or receivedata between each other through a security module 323 (for example: asecurity circuit). A security module 323 may be, for example, anembedded secure element (eSE) module. For example, through a securitymodule 323, a first processor 321 may encode acquisition instructiondata for an electronic device 101 to acquire state information from avehicle device 201 and may transmit the encoded acquisition instructiondata to a second processor 322. In addition, a second processor 322 mayacquire state information of a vehicle device 201 in response toacquisition instruction data, encode the state information through asecurity module 323, and transmit the encoded state information to afirst processor 321. A security module 323 may include an instructiontransmission target list and may block transmission of instruction datawhich does not correspond to the instruction transmission target list.

In addition, in a case that a symptom of abnormality occurs in a firstprocessor 321, a security module 323 may block transmission ofinstruction data from a first processor 321 to a second processor 322.For example, a processor 320 may include a security area (for example: atrust zone), and by executing a real-time kernel protection (RKP)function in the security area, kernel event hooking processing may beperformed. Accordingly, a first processor 321 may monitor an operatingsystem, a kernel, or an application of the first processor 321 in realtime, and when a symptom of abnormality (for example: datafalsification, hacking by a third party, or the like) is detected in atleast one thereof, the first processor 321 may block transmission ofinstruction data to a second processor 322. As another example, a firstprocessor 321 and a second processor 322 may operate through oneprocessor 320 without being separated. In addition, in a case that asecond processor 322 has no security function, a security module 323 mayprovide a security function to the second processor 322. Otherwise, asecurity module 323 may not be included in a processor 320.

FIG. 4 is a flowchart 400 for describing an operation in which anelectronic device determines the state of a vehicle device, according tovarious embodiments.

According to various embodiments, operations 401 to 406 may be executedthrough an electronic device 101 or a processor 120, 320, 321, or 322 ofFIGS. 1 to 3 . An electronic device 101 may store instructions forexecuting operations 401 to 406 in a memory (for example: a memory 130of FIG. 1 or a memory 330 of FIG. 3 ).

In operation 401, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may be connectedto a vehicle device 201. For example, an electronic device 101 mayinclude an OBD device based on an on-board diagnostics (OBD) protocol.In addition, a vehicle device 201 may include at least one enginecontrol unit (ECU) which is embedded in a vehicle 20 (for example, avehicle 20 of FIG. 2 ) and enables electronic control of variousfunctions related to an operation of the vehicle 20. An electronicdevice 101 may include an OBD connector based on an OBD protocol, andmay be connected to a connector provided in a vehicle 20, so that theelectronic device 101 and a vehicle device 201 may be electricallyconnected.

According to various embodiments, when an electronic device 101 iselectrically connected to a vehicle device 201, the electronic device101 may connect wired communication with the vehicle device 201 througha second communication module (for example: a second communicationmodule 392 of FIG. 3 ) of the electronic device 101. When an electronicdevice 101 is electrically connected to a vehicle device 201, it may bedetermined whether or not the connection to the vehicle device 201 isinitial connection. For example, when an electronic device 101 connectscommunication with a vehicle device 201, vehicle information (forexample: a vehicle identification number (VIN)) related to a vehicle 20may be received from the vehicle device 201. An electronic device 101may confirm whether or not vehicle information received from a vehicledevice 201 is stored in a memory of an electronic device 101 (forexample: a memory 130 of FIG. 1 or a memory 330 of FIG. 3 ). In a casethat vehicle information is not stored in a memory 330, an electronicdevice 101 may be determined to have initial connection to a vehicledevice 201. When it is determined that an electronic device 101 hasinitial connection to a vehicle device 201, the electronic device 101may request, based on vehicle information of the vehicle device 201,information related to the vehicle device from an external electronicdevice 210 (for example: a first external electronic device 210 a (forexample: a first server) of FIG. 2 ) through a first communicationmodule (for example: a first communication module 391 of FIG. 3 ) of theelectronic device 101, and may acquire, based on information receivedfrom the external electronic device 210 a in response to the request,first information. An external electronic device 210 a may be, forexample, an automobile company server, and when vehicle informationrelated to a vehicle 20 is received from an electronic device 101,information related to the vehicle 20 corresponding to the vehicleinformation may be provided to the electronic device 101. For example,information related to a vehicle 20 may include at least one among ECUID list information corresponding to vehicle information, vehiclebattery average consumption amount information, ECU firmware versioninformation, and vehicle safe limit configuration information.

In operation 402, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may acquire andstore first information related to a vehicle device 201. For example, anelectronic device 101 may acquire, based on information received from anexternal electronic device 210 a in response to a request of informationrelated to a vehicle device, first information, and may store theacquired first information in a memory 330. An electronic device 101 maystore acquired first information in a security area of a memory 330.Otherwise, an electronic device 101 may provide a user interface to auser and obtain, based on vehicle information input from the user,information related to a vehicle 20 from an external electronic device210 a. Otherwise, an electronic device 101 may be wirelessly connectedto an external electronic device 210 (for example: a third externalelectronic device 210 c (a mobile device) of FIG. 2 ) through a firstcommunication module (for example: a first communication module 391 ofFIG. 3 ), and may receive, based on vehicle information input from auser through a user interface of the external electronic device 210 c,information related to a vehicle 20 from an external electronic device(for example: a first external electronic device 210 a (a first server)of FIG. 2 ). Otherwise, an electronic device 101 may be wirelesslyconnected to an external electronic device 210 (for example: a thirdexternal electronic device 210 c (a mobile device) of FIG. 2 ) through afirst communication module 391, and may receive, based on vehicleinformation configured by the external electronic device 210 c,information related to a vehicle 20 from the external electronic device210 c. Based on received information related to a vehicle, an electronicdevice 101 may acquire at least one among ECU ID list information,vehicle battery average consumption amount information, ECU firmwareversion information, and vehicle safe limit configuration information ofa vehicle device 201, and may store the acquired information in a memory330.

In operation 403, an electronic device 101 according to variousembodiments (for example: a processor 120, 320, 321, or 322) maydetermine whether or not the electronic device 101 satisfies adesignated condition. For example, in a case that an electronic device101 or a vehicle device 201 is in a state related to rebooting, theelectronic device 101 or the vehicle device 201 is in a state related toremounting, or the electronic device 101 is in a state related to anoperating attribute (for example: vehicle starting stoppage, vehiclefirmware update, vehicle safe limit configuration change, or the like)of the vehicle device 201, or a preconfigured period (for example: amonitoring period) is reached, the electronic device 101 may bedetermined to satisfy a designated condition. When a designatedcondition is satisfied, an electronic device 101 may perform operation404. When a designated condition is not satisfied, a separate operationis not performed until the designated condition is satisfied, or ageneral operation of an electronic device 101 may be performed.

In operation 404, in a case that it is determined that an electronicdevice 101 satisfies a designated condition, the electronic device 101(for example: a processor 120, 320, 321, or 322) according to variousembodiments may acquire second information related to a vehicle 20 froma vehicle device 201 through a second communication module (for example:a second communication module 392 of FIG. 3 ).

According to various embodiments, when a designated condition of anelectronic device 101 is a state related to rebooting or remounting ofthe electronic device 101 or a vehicle device 201 or when apreconfigured period is reached, the electronic device 101 may requestinformation related to the vehicle device 201 from the vehicle device201 and acquire, based on information received from the vehicle device201 in response to the request, second information. For example, anelectronic device 101 may transmit an instruction request and receive aresponse to the instruction request to confirm an ECU ID of a vehicledevice 201. In an embodiment, an electronic device 101 may transmit thesame instruction to all ECUs included in a vehicle device 201 andreceive a response thereto to confirm an ECU ID of each of the ECUs. Inanother embodiment, an electronic device 101 may individually transmitan instruction to each of ECUs included in a vehicle device 201 andreceive a response thereto to confirm an ECU ID of each of the ECUs.According to another embodiment, an electronic device 101 may receive amessage broadcasted between ECUs of a vehicle device 201 regardless ofwhether or not the electronic device 101 satisfies a designatedcondition, and may confirm, based on the received message, each of ECUIDs. Otherwise, an electronic device 101 may receive a messagebroadcasted between ECUs of a vehicle device 201 and may confirm apattern (for example: the number of broadcasts, the amount of messagedata, or the like) of the received message. Otherwise, in order toconfirm information related to safe limit configuration of a vehicledevice 201 or ECU update version (for example: firmware version)information, an electronic device 101 may transmit a safe limitconfiguration information request instruction or an ECU update versioninformation request instruction and may receive safe limit configurationinformation or ECU update version information in response to theinstruction request. According to another embodiment, in a case that adesignated condition of an electronic device 101 is in a state relatedto vehicle starting maintenance of a vehicle device 201, the electronicdevice 101 may confirm a vehicle battery consumption amount for acertain period of time.

In operation 405, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may determine,based on first information and second information, the state of avehicle device 201. For example, an electronic device 101 may determinethe state of a vehicle device 201 using an ECU ID list of the vehicledevice 201 stored in a memory 330 and an ECU ID based on a response fromthe vehicle device 201. When an ECU ID list of a vehicle device 201stored in a memory 330 is compared to an ECU ID based on a response anda difference occurs, an electronic device 101 may determine thatabnormality occurs in the state of the vehicle device 201. Otherwise,when an ECU ID list of a vehicle device 201 stored in a memory 330 iscompared to an ECU ID based on monitoring of a message broadcastedbetween ECUs of the vehicle device 201 and a difference occurs, anelectronic device 101 may determine that abnormality occurs in the stateof the vehicle device 201. Otherwise, when a pattern of a messagebroadcasted between ECUs of a vehicle device 201 stored in a memory 330is compared to a pattern of a message based on monitoring of a messagebroadcasted between the ECUs of the vehicle device 201 and a differenceoccurs, an electronic device 101 may determine that abnormality occursin the state of the vehicle device 201. Otherwise, when informationrelated to safe limit configuration stored in a memory 330 is comparedto safe limit configuration received from a vehicle device 201 and adifference occurs, an electronic device 101 may determine thatabnormality occurs in the state of the vehicle device 201. In addition,when ECU update version (for example: firmware version) informationstored in a memory 330 is compared to an ECU update version receivedfrom a vehicle device 201 and a difference occurs, an electronic device101 may determine that abnormality occurs in the state of the vehicledevice 201. According to another embodiment, when vehicle batteryaverage consumption amount information, stored in a memory 330, at thetime of stopping of vehicle starting is compared to a vehicle batteryconsumption amount confirmed for a certain period of time at the time ofstopping of vehicle starting by using a vehicle device 201 and adifference occurs, an electronic device 101 may determine thatabnormality occurs in the state of the vehicle device 201.

In operation 406, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may perform,based on the state of a vehicle device 201, a designated operation. Forexample, in a case that it is determined that abnormality is detected inthe state of a vehicle device 201, an electronic device 101 may notify,through a first communication module (for example: a first communicationmodule 391 of FIG. 3 ), state abnormality of the vehicle device 201 toan external electronic device 210 (for example: a first externalelectronic device 210 a (a first server), a second external electronicdevice 210 b (a second server), or a third external electronic device210 c (a mobile device) of FIG. 2 ). Otherwise, in a case that it isdetermined that abnormality is detected in the state of a vehicle device201, an electronic device 101 may store an indication of stateabnormality of the vehicle device 201 in a security area of a memory330. For example, a security area of a memory 330 may include anattestation bit indicating the attestation state of a vehicle, and in acase that it is determined that abnormality is detected in the state ofa vehicle device 201, an electronic device 101 may configure and storethe value of the attestation bit as an inactive value. Attestation of avehicle may be renewed at regular intervals, and when an attestationrenewal period of the vehicle is reached, an external electronic device210 (for example: a second external electronic device 210 b (a secondserver) of FIG. 2 ) may determine, based on an attestation bit stored ina security area of a memory 330, extension of attestation of thevehicle.

FIG. 5 is a flowchart 500 for describing an operation in which anelectronic device and an external electronic device determine the stateof a vehicle device, according to various embodiments.

According to various embodiments, operations 501 to 511 may be executedthrough an electronic device 101 or a processor 120, 320, 321, or 322 ofFIGS. 1 to 3 . An electronic device 101 may store instructions forexecuting operations 501 to 511 in a memory (for example: a memory 130of FIG. 1 or a memory 330 of FIG. 3 ).

In operation 501, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may be connectedto a vehicle device 201. When an electronic device 101 is electricallyconnected to a vehicle device 201, it may be determined whether or notthe connection to the vehicle device 201 is initial connection. If it isdetermined that an electronic device 101 has initial connection to avehicle device 201, the electronic device 101 may request vehicleinformation (for example: a vehicle identification number (VIN)) relatedto a vehicle 20 from the vehicle device 201.

In operation 502, an electronic device 101 according to variousembodiments (for example: a processor 120, 320, 321, or 322) may receivevehicle information related to a vehicle 20 from a vehicle device 201.In another example, an electronic device 101 may receive vehicleinformation input from a user through a user interface of the electronicdevice 101 without receiving vehicle information related to a vehicle 20from a vehicle device 201. Otherwise, an electronic device 101 may bewirelessly connected to an external electronic device 210 (for example:a third external electronic device 210 c (a mobile device) of FIG. 2 )through a first communication module (for example: a first communicationmodule 391 of FIG. 3 ), and may receive vehicle information input from auser through a user interface of the external electronic device 210 c.

In operation 503, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may transmitvehicle information related to a vehicle 20 to an external electronicdevice 210. An electronic device 101 may request information related toa vehicle 20 corresponding to vehicle information from an externalelectronic device 210 by transmitting the vehicle information.

In operation 504, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receiveinformation related to a vehicle 20 from an external electronic device210. For example, an electronic device 101 may receive an ECU ID list ofa vehicle 20 related to vehicle information from an external electronicdevice 210.

In operation 505, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may store areceived ECU ID list in a memory 330. For example, an electronic device101 may store a received ECU ID list in a security area of a memory 330.

In operation 506, an electronic device 101 (for example, a processor120, 320, 321, and 322) according to various embodiments may determinewhether or not an electronic device 101 satisfies a designatedcondition. For example, in a case that an electronic device 101 or avehicle device 201 is in a state related to rebooting, an electronicdevice 101 or a vehicle device 201 is in a state related to remounting,or a preconfigured period (for example: a monitoring period) is reached,an electronic device 101 may be determined to satisfy a designatedcondition. When a designated condition is satisfied, an electronicdevice 101 may perform operation 507. When a designated condition is notsatisfied, a separate operation is not performed until the designatedcondition is satisfied, or a general operation of an electronic device101 may be performed.

In operation 507, in a case that it is determined that an electronicdevice 101 (for example: a processor 120, 320, 321, or 322) according tovarious embodiments satisfies a designated condition, the electronicdevice 101 may transmit, to a vehicle device 201, an instruction requestthrough a second communication module (for example, a secondcommunication module 392 of FIG. 3 ). For example, an electronic device101 may transmit the same instruction to all ECUs included in a vehicledevice 201 or individually transmit an instruction to each of the ECUsincluded in the vehicle device 201.

In operation 508, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receive aresponse to an instruction request from a vehicle device 201. Forexample, an electronic device 101 may transmit the same instruction toall ECUs included in a vehicle device 201 and receive a response theretoto confirm an ECU ID of each of the ECUs. Otherwise, an electronicdevice 101 may individually transmit an instruction to each of ECUsincluded in a vehicle device 201 and receive a response thereto toconfirm an ECU ID of each of the ECUs.

In operation 509, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may determinethe state of a vehicle device 201 by using an ECU ID based on a responsefrom the vehicle device 201 and an ECU ID list of the vehicle device 201stored in a memory 330. For example, when an ECU ID list of a vehicledevice 201 stored in a memory 330 is compared to an ECU ID based on aresponse and a difference occurs, an electronic device 101 may determinethat abnormality occurs in the state of the vehicle device 201.

In operation 510, in a case that it is determined that abnormalityoccurs in the state of a vehicle device 201, an electronic device 101(for example: a processor 120, 320, 321, or 322) according to variousembodiments may perform operation 511. Otherwise, in a case that it isdetermined that abnormality does not occur in the state of a vehicledevice 201, an electronic device 101 may perform operation 506 and notperform a separate operation until a designated condition is satisfied,or a general operation of an electronic device 101 may be performed.

In operation 511, in a case that it is determined that abnormality isdetected in the state of a vehicle device 201, an electronic device 101(for example: a processor 120, 320, 321, or 322) according to variousembodiments may notify, through a first communication module (forexample: a first communication module 391 of FIG. 3 ), state abnormalityof the vehicle device 201 to an external electronic device 210 (forexample: a first external electronic device 210 a (a first server), asecond external electronic device 210 b (a second server), or a thirdexternal electronic device 210 c (a mobile device) of FIG. 2 ).According to another embodiment, in a case that it is determined thatabnormality is detected in the state of a vehicle device 201, anelectronic device 101 may store an indication of state abnormality ofthe vehicle device 201 in a security area of a memory 330. For example,a security area of a memory 330 may include an attestation bitindicating the attestation state of a vehicle, and in a case that it isdetermined that abnormality is detected in the state of a vehicle device201, an electronic device 101 may configure and store the value of theattestation bit as an inactive value.

In an embodiment, based on an indication of state abnormality of avehicle device 201 notified or stored in a security area of a memory330, state abnormality of the vehicle device 201 may be displayed on adisplay of an external electronic device 210 or another electronicdevice.

FIG. 6 is a flowchart 600 for describing an operation in which anelectronic device and an external electronic device determine the stateof a vehicle device, according to various embodiments.

According to various embodiments, operations 601 to 609 may be executedthrough an electronic device 101 or a processor 120, 320, 321, or 322 ofFIGS. 1 to 3 . An electronic device 101 may store instructions forexecuting operations 601 to 609 in a memory (for example: a memory 130of FIG. 1 or a memory 330 of FIG. 3 ).

Operations 601 to 605 may be substantially the same as operations 501 to505. An electronic device 101 may be connected to a vehicle device 201,receive vehicle information from the vehicle device 201, transmit thevehicle information to an external electronic device 210, receive an ECUID list related to the vehicle information from the external electronicdevice 210, and store the received ECU ID in a memory 330.

In operation 606, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receive amessage broadcasted between ECUs of a vehicle device 201. For example,an electronic device 101 may receive a message broadcasted between ECUsof a vehicle device 201 and confirm, based on the received message, eachof ECU IDs. Otherwise, an electronic device 101 may receive a messagebroadcasted between ECUs of a vehicle device 201 and confirm a pattern(for example: the number of broadcasts, the amount of message data, orthe like) of the received message.

In operation 607, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may determinethe state of a vehicle device 201 by using an ECU ID list of the vehicledevice 201 stored in a memory 330 and an ECU ID based on monitoring of amessage broadcasted between ECUs of the vehicle device 201. For example,when an ECU ID list of a vehicle device 201 stored in a memory 330 iscompared to an ECU ID based on monitoring of a message broadcastedbetween ECUs of the vehicle device 201 and a difference occurs, anelectronic device 101 may determine that abnormality occurs in the stateof the vehicle device 201. According to another embodiment, when apattern of a message broadcasted between ECUs of a vehicle device 201stored in a memory 330 is compared to a pattern of a message based onmonitoring of a message broadcasted between the ECUs of the vehicledevice 201 and a difference occurs, an electronic device 101 maydetermine that abnormality occurs in the state of the vehicle device201.

In operation 608, in a case that it is determined that abnormalityoccurs in the state of a vehicle device 201, an electronic device 101(for example: a processor 120, 320, 321, or 322) according to variousembodiments may perform operation 609. Otherwise, in a case that it isdetermined that abnormality does not occur in the state of a vehicledevice 201, an electronic device 101 may perform operation 606 andperform an operation of receiving and monitoring a message broadcastedbetween ECUs of a vehicle device 201.

In operation 609, when it is determined that abnormality is detected inthe state of a vehicle device 201, an electronic device 101 (forexample: a processor 120, 320, 321, or 322) according to variousembodiments may notify, through a first communication module (forexample: a first communication module 391 of FIG. 3 ), state abnormalityof the vehicle device 201 to an external electronic device 210 (forexample: a first external electronic device 210 a (a first server), asecond external electronic device 210 b (a second server), or a thirdexternal electronic device 210 c (a mobile device) of FIG. 2 ).According to another embodiment, when it is determined that abnormalityis detected in the state of a vehicle device 201, an electronic device101 may store an indication of state abnormality of the vehicle device201 in a security area of a memory 330.

In an embodiment, based on an indication of state abnormality of avehicle device 201 notified or stored in a security area of a memory330, state abnormality of the vehicle device 201 may be displayed on adisplay of an external electronic device 210 or another electronicdevice.

FIG. 7 is a flowchart 700 for describing an operation in which anelectronic device and an external electronic device determine the stateof a vehicle device, according to various embodiments.

According to various embodiments, operations 701 to 710 may be executedthrough an electronic device 101 or a processor 120, 320, 321, or 322 ofFIGS. 1 to 3 . An electronic device 101 may store instructions forexecuting operations 701 to 710 in a memory (for example: a memory 130of FIG. 1 or a memory 330 of FIG. 3 ).

Operations 701 to 703 may be substantially the same as operations 501 to503 or operations 601 to 603. An electronic device 101 may be connectedto a vehicle device 201, receive vehicle information from the vehicledevice 201, and transmit the vehicle information to an externalelectronic device 210.

In operation 704, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receivevehicle battery average consumption amount information from an externalelectronic device 210. For example, vehicle battery average consumptionamount information may be information on a battery consumption amountfor a certain period of time after elapsing of a certain period of timefrom a time point when starting of a vehicle 20 has stopped. Otherwise,without depending on an external electronic device 210, an electronicdevice 101 may autonomously collect vehicle battery average consumptionamount information to calculate vehicle battery average consumptionamount information.

In operation 705, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may storevehicle battery average consumption amount information received from anexternal electronic device 210. In addition, in a case that anelectronic device 101 autonomously collects vehicle battery averageconsumption amount information without depending on an externalelectronic device 210 and calculates and stores battery averageconsumption amount information, information may be maintained up to dateby collecting and updating information on a consumption amount of abattery whenever starting of a vehicle 20 stops. Moreover, a battery hasa property of basically deteriorated after a time elapses, and thusinformation on a consumption amount of a battery may be corrected inconsideration of a production year, driving distance, driving time,battery usage period, and the like of a vehicle. Furthermore, a batteryhas a property of being differently consumed according to surroundingtemperatures, an external air temperature at a time point wheninformation on a consumption amount of a battery is collected may bestored together.

In operation 706, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may determinewhether or not starting of a vehicle 20 stops. In a case that startingof a vehicle stops, an electronic device 101 may perform operation 707.Otherwise, in a case that starting of a vehicle does not stop, aseparate operation may not be performed until starting of a vehicle 20stops, or a general operation of the electronic device 101 may beperformed.

In operation 707, when starting of a vehicle stops, an electronic device101 (for example: a processor 120, 320, 321, or 322) according tovarious embodiments may transmit acquisition instruction data foracquiring a battery consumption amount to a vehicle device 201 at a timepoint after a certain period of time elapses, and may confirminformation on a battery consumption amount for a certain period oftime.

In operation 708, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments of thedisclosure may determine the state of a vehicle device 201 by using avehicle battery average consumption amount stored in a memory 330 and aconfirmed vehicle battery consumption amount. For example, when averageconsumption amount information of a vehicle battery when starting of avehicle stops, stored in a memory 330, is compared to a vehicle batteryconsumption amount confirmed, using a vehicle device 201, for a certainperiod of time when starting of a vehicle stops and a difference occurs,an electronic device 101 may determine that abnormality occurs in thestate of the vehicle device 201. An ECU of a vehicle device 201 may beillegally mounted, or an operation of an ECU may be stopped orexcessively operated due to illegal tuning, and in this case, a batteryusage amount may change. Thus, by detecting such a difference, stateabnormality of a vehicle device 201 may be determined.

In operation 709, in a case that it is determined that abnormalityoccurs in the state of a vehicle device 201, an electronic device 101(for example: a processor 120, 320, 321, or 322) according to variousembodiments may perform operation 710. Otherwise, in a case that it isdetermined that abnormality does not occur in the state of a vehicledevice 201, an electronic device 101 may perform operation 707, and theelectronic device 101 may continue an operation of transmittingacquisition instruction data for acquiring a battery consumption amountto the vehicle device 201 and confirming information on a batteryconsumption amount for a certain period of time.

In operation 710, in a case that it is determined that abnormality isdetected in the state of a vehicle device 201, an electronic device 101(for example: a processor 120, 320, 321, or 322) according to variousembodiments may notify, through a first communication module (forexample: a first communication module 391 of FIG. 3 ), state abnormalityof the vehicle device 201 to an external electronic device 210 (forexample: a first external electronic device 210 a (a first server), asecond external electronic device 210 b (a second server), or a thirdexternal electronic device 210 c (a mobile device) of FIG. 2 ).According to another embodiment, when it is determined that abnormalityis detected in the state of a vehicle device 201, an electronic device101 may store an indication of state abnormality of the vehicle device201 in a security area of a memory 330.

In an embodiment, based on an indication of state abnormality of avehicle device 201 notified or stored in a security area of a memory330, state abnormality of the vehicle device 201 may be displayed on adisplay of an external electronic device 210 or another electronicdevice.

FIG. 8 is a flowchart 800 for describing an operation in which anelectronic device and an external electronic device determine the stateof a vehicle device, according to various embodiments.

According to various embodiments, operations 801 to 808 may be executedthrough an electronic device 101 or a processor 120, 320, 321, or 322 ofFIGS. 1 to 3 . An electronic device 101 may store instructions forexecuting operations 801 to 808 in a memory (for example: a memory 130of FIG. 1 or a memory 330 of FIG. 3 ).

In operation 801, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may confirm anupdate of a vehicle device 201. For example, an electronic device 101may transmit an update version information request instruction of avehicle device 201 to confirm an update of a vehicle device 201.

In operation 802, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receiveupdate version information of a vehicle device 201 in response to anupdate version information request instruction from the vehicle device201. Otherwise, in a case that a vehicle device 201 performs an update,an electronic device 101 may confirm update version (for example:firmware version) information according to execution of an update.

In operation 803, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may confirmwhether or not communication with an external electronic device 210 ispossible. For example, an electronic device 101 may perform operation804 in a case that communication with an external electronic device 210is not possible, and the electronic device 101 may perform operation 805in a case that communication is possible.

In operation 804, in a case that communication with an externalelectronic device 210 is not possible, an electronic device 101 (forexample: a processor 120, 320, 321, or 322) according to variousembodiments may store acquired update information of a vehicle device201 in a memory 330. Acquired update information of a vehicle device 201may be stored in a security area of a memory 330. An electronic device101 may store update information in a memory 330, and may performoperation 805 when communication with an external electronic device 210becomes possible.

In operation 805, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may request,from an external electronic device 210, confirmation for acquired updateversion information of a vehicle device 201. An external electronicdevice 210 may compare, based on vehicle information included in aconfirmation request, update version information corresponding to thevehicle information to received update version information to determinethe state of update version information.

In operation 806, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receive aresult of confirmation for update version information from an externalelectronic device 210.

In operation 807, in a case that it is determined that abnormalityoccurs in an update state, an electronic device 101 (for example: aprocessor 120, 320, 321, or 322) according to various embodiments mayperform operation 808. Otherwise, in a case that it is determined thatabnormality does not occur in an update state, a separate operation maynot be performed, or a general operation of an electronic device 101 maybe performed.

In operation 808, in a case that it is determined that abnormalityoccurs in an update state, an electronic device 101 (for example: aprocessor 120, 320, 321, or 322) according to various embodiments maydetermine that abnormality occurs in the state of a vehicle device 201and store an indication of state abnormality of the vehicle device 201in a security area of a memory 330. For example, a security area of amemory 330 may include an attestation bit indicating the attestationstate of a vehicle, and in a case that it is determined that abnormalityis detected in the state of a vehicle device 201, an electronic device101 may configure and store the value of the attestation bit as aninactive value. Attestation of a vehicle may be renewed at regularintervals, and when an attestation renewal period of the vehicle isreached, an external electronic device 210 (for example: a secondexternal electronic device 210 b (a second server) of FIG. 2 ) maydetermine, based on an attestation bit stored in a security area of amemory 330, extension of attestation of the vehicle.

FIG. 9 is a flowchart 900 for describing an operation in which anelectronic device determines the state of a vehicle device, according tovarious embodiments.

According to various embodiments, operations 901 to 908 may be executedthrough an electronic device 101 or a processor 120, 320, 321, or 322 ofFIGS. 1 to 3 . An electronic device 101 may store instructions forexecuting operations 901 to 908 in a memory (for example: a memory 130of FIG. 1 or a memory 330 of FIG. 3 ).

In operation 901, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may bereconnected to a vehicle device 201. For example, when an electronicdevice 101 is electrically connected to a vehicle device 201, wiredcommunication with the vehicle device 201 may be connected through asecond communication module (for example: a second communication module392 of FIG. 3 ) of the electronic device 101. When an electronic device101 is electrically connected to a vehicle device 201, it may bedetermined whether or not the connection is reconnection to the vehicledevice 201. For example, an electronic device 101 may receive vehicleinformation (for example: a vehicle identification number (VIN)) relatedto a vehicle 20 from a vehicle device 201, and it may be confirmedwhether or not received vehicle information is stored in a memory (forexample, a memory 130 of FIG. 1 or a memory 330 of FIG. 3 ) of anelectronic device 101. In a case that vehicle information is stored in amemory 330, an electronic device 101 may determine that connection to avehicle device 201 is reconnection.

In operation 902, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may transmit asafe limit configuration information request instruction to a vehicledevice 201 and receive safe limit configuration information in responseto an instruction request.

In operation 903, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may store safelimit configuration information acquired from a vehicle device 201 in asecurity area of a memory 330.

In operation 904, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may determinewhether or not stored safe limit configuration information is differentfrom information previously stored in a security area of a memory 330.For example, before acquired safe limit configuration information isstored in a memory 330, an electronic device 101 may confirm safe limitconfiguration information previously stored in a memory 330 (forexample: a snapshot), and may determine whether or not there is adifference after the acquired safe limit configuration information isstored. In a case that it is determined that there is a difference frompre-stored information, an electronic device 101 may perform operation905, and in a case that there is no difference, a separate operation maynot be performed or a general operation of the electronic device 101 maybe performed.

In operation 905, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may request,from an external electronic device 210, confirmation for a differencefrom previously stored information. An external electronic device 210may determine the state of safe limit configuration information bycomparing, based on vehicle information included in a confirmationrequest, safe limit configuration information corresponding to thevehicle information to information requested to be confirmed.

In operation 906, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receive aresult of confirmation of safe limit configuration information from anexternal electronic device 210.

In operation 907, in a case that it is determined that abnormalityoccurs in the state of safe limit configuration information, anelectronic device 101 (for example: a processor 120, 320, 321, or 322)according to various embodiments may perform operation 908. Otherwise,in a case that it is determined that abnormality does not occur in thestate of safe limit configuration information, an electronic device 101may not perform a separate operation, or a general operation of theelectronic device 101 may be performed.

In operation 908, in a case that it is determined that abnormalityoccurs in the state of safe limit configuration information, anelectronic device 101 (for example: a processor 120, 320, 321, or 322)according to various embodiments may determine that abnormality occursin the state of a vehicle device 201 and store an indication of stateabnormality of the vehicle device 201 in a security area of a memory330. For example, a security area of a memory 330 may include anattestation bit indicating the attestation state of a vehicle, and in acase that it is determined that abnormality is detected in the state ofa vehicle device 201, an electronic device 101 may configure and storethe value of the attestation bit as an inactive value. Attestation of avehicle may be renewed at regular intervals, and when an attestationrenewal period of the vehicle is reached, an external electronic device210 (for example: a second external electronic device 210 b (a secondserver) of FIG. 2 ) may determine, based on an attestation bit stored ina security area of a memory 330, extension of attestation of thevehicle.

FIG. 10 is a flowchart 1000 for describing an operation in which anelectronic device and an external electronic device determine the stateof a vehicle device, according to various embodiments.

According to various embodiments, operations 1001 to 1006 may beexecuted through an electronic device 101 or a processor 120, 320, 321,or 322 of FIGS. 1 to 3 . An electronic device 101 may store instructionsfor executing operations 1001 to 1006 in a memory (for example: a memory130 of FIG. 1 or a memory 330 of FIG. 3 ).

In operation 1001, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may determinewhether or not an attestation renewal period of a vehicle 20 is reached.In a case that an attestation renewal period of a vehicle 20 is reached,an electronic device 101 may perform operation 1002. In a case that anattestation renewal period of a vehicle 20 is not reached, a separateoperation is not performed or a general operation of an electronicdevice 101 may be performed.

In operation 1002, in a case that an attestation renewal period of avehicle 20 is reached, an electronic device 101 (for example, aprocessor 120, 320, 321, or 322) according to various embodiments maytransmit state information of a vehicle device 201 stored in a securityarea of a memory 330 to an external electronic device 210. For example,an electronic device 101 may encode state information of a vehicledevice 201 and transmit the encoded information to an externalelectronic device 210.

In operation 1003, an external electronic device 210 according tovarious embodiments (for example: a second external electronic device210 b (a second server) of FIG. 2 ) may determine, based on receivedstate information of a vehicle device 201, the state of the vehicledevice 201. For example, an external electronic device 210 may decodeencoded state information of a vehicle device 201 and confirm decodedstate information of the vehicle device 201. For example, stateinformation of a vehicle device 201 transmitted to an externalelectronic device 210 may include an attestation bit indicating theattestation state of a vehicle. An external electronic device 210 mayconfirm whether or not the value of an attestation bit is active orinactive, and when the value of the attestation bit is active, theexternal electronic device 210 may determine that there is noabnormality in the state of a vehicle device 201 and perform operation1004. Otherwise, when the value of the attestation bit is inactive, anexternal electronic device 210 may determine that there is abnormalityin the state of a vehicle device 201 and perform operation 1006.

In operation 1004, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may receivenotification of successful attestation renewal of a vehicle device 201from an external electronic device 210.

In operation 1005, an electronic device 101 (for example: a processor120, 320, 321, or 322) according to various embodiments may renewattestation of a vehicle 20 by renewing an expiration time of anattestation bit stored in a security area of a memory 330.

In operation 1006, an external electronic device 210 (for example: asecond external electronic device 210 b (a second server) of FIG. 2 )according to various embodiments may process attestation renewal of avehicle 20 as a failure and configure a limit to a vehicleattestation-related service. In addition, an external electronic device210 may notify a failure of attestation renewal of a vehicle 20 toanother external electronic device 210 (for example: a first externalelectronic device 210 a (a first server) of FIG. 2 ) or a third externalelectronic device 210 c (a mobile device).

According to various embodiments, in a case that abnormality occurs inthe state of a vehicle 20, an external electronic device 210 may limit aservice according to a service policy or provide warning notification toa user. In such a scenario, Mr./Ms. A, who owns an automobile of companyB, has illegally mapped a vehicle device 201 (for example: ECU) embeddedin a vehicle 20 to improve the performance of the vehicle 20 afterpurchasing the vehicle. ECU illegal mapping means changing referencevehicle output setting values of a manufacturer. Such ECU illegalmapping may increase harmful exhaust gas emissions or cause damage to avehicle engine. During free AS (warranty) period, an engine of a vehiclehas been damaged due to excessive ECU illegal mapping of Mr./Ms. A, andMr./Ms. A has requested free repair after restoring ECU firmware of avehicle device 201 to an original state. However, a service center ofcompany B may confirm illegal mapping of a vehicle 20 through detection,recording, and notification functions of an abnormal ECU updateaccording to various embodiments and may refuse free AS of the vehicle.

In another scenario, Mr./Ms. C has mounted, to a vehicle 20, anelectronic device 101 (for example: an OBD terminal) provided by aninsurance company with a condition of return of a partial insurancepremium for achievement of one-year safe driving. However, after buyinginsurance, Mr./Ms. C, infringing a contract, has allowed safe limitconfiguration (for example: limit configuration for DMB watching, DVDmovie watching, or navigation operation during driving) values to becanceled in an illegal automobile repair shop. The insurance company mayconfirm an illegal change in safe limit configuration of a vehicle 20through detection, recording, and notification functions of abnormalsafe limit configuration according to various embodiments and may refusereturn of an insurance premium.

An electronic device (for example: an electronic device 101 of FIGS. 1to 3 ) according to various embodiments may include: at least onecommunication circuit (for example: a communication module 190 of FIG. 1, a first communication module 391 of FIG. 3 , or a second communicationmodule 392 of FIG. 3 ) configured to provide communication with avehicle device (for example: an electronic device 102 of FIG. 1 or anelectronic device 201 of FIG. 2 , hereinafter, collectively referred toas 201) or an external electronic device (for example: an electronicdevice 101, an electronic device 102, an electronic device 104, or aserver 108 of FIG. 1 or first to third external electronic devices 210a, 210 b, or 210 c of FIG. 2 , hereinafter, collectively referred to as210); at least one processor (for example: a processor 120 of FIG. 1 , aprocessor 320 of FIG. 3 , a first processor 321 of FIG. 3 , or a secondprocessor 322 of FIG. 3 ) electrically connected to the at least onecommunication circuit 190, 391, or 392; and a memory (for example: amemory 130 of FIG. 1 or a memory 330 of FIG. 3 ) electrically connectedto the at least one processor 120, 320, 321, or 322, wherein the memory130 or 330 stores instructions configured to cause the at least oneprocessor 120, 320, 321, or 322, when executed, to: when connected tothe vehicle device 201, acquire and store first information related tothe vehicle device 201; in a case that the electronic device 101satisfies a designated condition, acquire second information related tothe vehicle device 201 from the vehicle device 201; based on the firstinformation and the second information, determine the state of thevehicle device 201; and based on the determination, perform a designatedoperation.

In the electronic device 101 according to various embodiments, theelectronic device 101 may include a device based on an on-boarddiagnostics (OBD) protocol, and the vehicle device 201 may include atleast one engine control unit (ECU) embedded in a vehicle (for example:a vehicle 20 of FIG. 2 ).

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to: when electrically connected to the vehicle device 201, determinewhether or not the connection to the vehicle device 201 is initialconnection; when it is determined that the connection to the vehicledevice 201 is initial connection, request, based on initial connectionof the vehicle device 201, information related to the vehicle device 201from the external electronic device 210 through the at least onecommunication circuit 190, 391, or 392; acquire, based on informationreceived from the external electronic device 210 in response to therequest, the first information through the at least one communicationcircuit 190, 391, or 392; and store the acquired first information inthe memory 130 or 330.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to: when electrically connected to the vehicle device 201, determinewhether or not the connection to the vehicle device is initialconnection; when it is determined that the connection to the vehicledevice 201 is initial connection, request information related to thevehicle device 201 from the vehicle device 201 through the at least onecommunication circuit 190, 391, or 392; acquire, based on informationreceived from the vehicle device 201 in response to the request, thefirst information through the at least one communication circuit 190,391, or 392; and store the acquired first information in the memory 130or 330.

In the electronic device 101 according to various embodiments, thedesignated condition may include at least one among a condition in whichthe electronic device 101 or the vehicle device 201 is in a staterelated to rebooting, a condition in which the electronic device 101 orthe vehicle device 201 is in a state related to remounting, a conditionin a state related to an operation attribute of the vehicle device 201,or a condition in a state in which a preconfigured period is reached.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to: in a case that the electronic device 101 satisfies a designatedcondition, request information related to the vehicle device 201 fromthe vehicle device 201 through the at least one communication circuit190, 391, or 392; and based on information received from the vehicledevice 201 in response to the request, acquire the second informationthrough the at least one communication circuit 190, 391, or 392.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to acquire, based on a message broadcasted from the vehicle device201, the second information through the at least one communicationcircuit 190, 391, or 392 in a case that the electronic device 101satisfies a designated condition.

In the electronic device 101 according to various embodiments, the stateof the vehicle device 201 may include at least one among whether or notan identifier of at least one engine control unit (ECU) embedded in avehicle 20 is abnormal, a battery consumption amount related to anoperation of the vehicle 20, whether or not data between the at leastone ECU is abnormal, whether or not a firmware version of the at leastone ECU is abnormal, or whether or not safe limit configuration for thevehicle 20 is abnormal.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to notify an abnormality state of the vehicle device 201 to theexternal electronic device 210 through the at least one communicationcircuit 190, 391, or 392 in a case that it is determined that the stateof the vehicle device 201 is detected to be abnormal.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to store an abnormality state of the vehicle device 201 in asecurity area of the memory 130 or 330 in a case that it is determinedthat the state of the vehicle device 201 is detected to be abnormal.

The at least one communication circuit 190, 391, or 392 may include: afirst communication circuit (for example: a first communication module391 of FIG. 3 ) configured to provide wireless communication (forexample: a local area wireless communication network 198 of FIGS. 1 or 2or a long distance wireless communication network 199 of FIGS. 1 or 2 )with the external electronic device 210; and a second communicationcircuit (for example: a second communication module 392 of FIG. 3 )electrically connected to the vehicle device 201 and configured toprovide wired communication (for example: wired communication through aconnection terminal 178 of FIG. 1 ).

In the electronic device 101 according to various embodiments, the atleast one processor 120, 320, 321, or 322 may include: a first processor(for example: a first processor 321 of FIG. 3 ) configured to requestinformation related to the vehicle device 201 from the vehicle device201, acquire information received from the vehicle device 201 inresponse to the request, and determine, based on the acquiredinformation, the state of the vehicle device 201; and a second processor(for example: a second processor 322 of FIG. 3 ) configured to convert afirst format of the request received from the first processor 321 into adifferent second format transmittable to the vehicle device 201 andconvert a second format of information received from the vehicle device201 into the first format transmittable to the first processor 321.

The electronic device 101 according to various embodiments may furtherinclude a security circuit (for example: a security module 323 of FIG. 3) configured to encode or block data transmitted or received between thefirst processor 321 and the second processor 322.

An electronic device (for example: an electronic device 101 of FIGS. 1to 3 ) according to various embodiments may include: at least onecommunication circuit 190, 391, or 392 configured to providecommunication with a vehicle device 201 or a first external electronicdevice (for example: an electronic device 101, an electronic device 102,an electronic device 104, or a server 108 of FIG. 1 or a first externalelectronic device 210 a of FIG. 2 ); at least one processor 120, 320,321, or 322 electrically connected to the at least one communicationcircuit 190, 391, or 392; and a memory 130 or 330 electrically connectedto the at least one processor 120, 320, 321, or 322, wherein the memory130 or 330 stores instructions configured to cause the at least oneprocessor 120, 320, 321, or 322, when executed, to: when connected tothe vehicle device 201, acquire first information related to the vehicledevice 201 through the at least one communication circuit 190, 391, or392; transmit at least a part of the first information through the atleast one communication circuit 190, 391, or 392 to the first externalelectronic device 210 a; in a case that the electronic device 101satisfies a designated condition, acquire second information related tothe vehicle device 201 from the vehicle device 201 through the at leastone communication circuit 190, 391, or 392; transmit at least a part ofthe second information to the first external electronic device 210 athrough the at least one communication circuit 190, 391, or 392; and inresponse to transmission of the first information and the secondinformation, receive, through the at least one communication circuit190, 391, or 392, information related to the state of the vehicle device201 determined by the first external electronic device 210 a from thefirst external electronic device 210 a, and perform, based on thereceived information, a designated operation.

In the electronic device 101 according to various embodiments, thedesignated condition may include at least one among a condition in whichthe electronic device 101 or the vehicle device 201 is in a staterelated to rebooting, a condition in which the electronic device 101 orthe vehicle device 201 is in a state related to remounting, a conditionin a state related to an operation attribute of the vehicle device 201,or a condition in a state in which a preconfigured period is reached.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to: in a case that the electronic device 101 satisfies a designatedcondition, request information related to the vehicle device 201 fromthe vehicle device 201 through the at least one communication circuit190, 391, or 392; and based on information received from the vehicledevice 201 in response to the request, acquire the second informationthrough the at least one communication circuit 190, 391, or 392.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to acquire, based on a message broadcasted from the vehicle device201, the second information through the at least one communicationcircuit 190, 391, or 392 in a case that the electronic device 101satisfies a designated condition.

In the electronic device 101 according to various embodiments, the stateof the vehicle device 201 may include at least one among whether or notan identifier of at least one engine control unit (ECU) embedded in avehicle 20 is abnormal, a battery consumption amount related to anoperation of the vehicle 20, whether or not data between the at leastone ECU is abnormal, whether or not a firmware version of the at leastone ECU is abnormal, or whether or not safe limit configuration for thevehicle 20 is abnormal.

In the electronic device 101 according to various embodiments, theinstructions may be configured to cause the processor 120, 320, 321, or322 to notify an abnormality state of the vehicle device 201 to a secondexternal electronic device (for example: an electronic device 101, anelectronic device 102, an electronic device 104, or a server 108 of FIG.1 or a second external electronic device 210 b of FIG. 2 ) through theat least one communication circuit 190, 391, or 392 or store anabnormality state of the vehicle device 201 in a security area of thememory 130 or 330 in a case that it is determined that the state of thevehicle device 201 is detected to be abnormal.

In a storage medium which non-transitorily stores instructions accordingto various embodiments, when executed by at least one circuit, theinstructions may be configured to cause the at least one circuit toperform at least one operation, and the at least one operation mayinclude: when an electronic device 101 and a vehicle device 201 areconnected, acquiring and storing first information related to thevehicle device 201; in a case that the electronic device 101 satisfies adesignated condition, acquiring second information related to thevehicle device 201 from the vehicle device 201; based on the firstinformation and the second information, determining the state of thevehicle device 201; and based on the determination, performing adesignated operation.

The electronic device according to various embodiments may be one ofvarious types of electronic devices. The electronic devices may include,for example, a portable communication device (e.g., a smart phone), acomputer device, a portable multimedia device, a portable medicaldevice, a camera, a wearable device, or a home appliance. According toan embodiment of the disclosure, the electronic devices are not limitedto those described above.

It should be appreciated that various embodiments of the disclosure andthe terms used therein are not intended to limit the technologicalfeatures set forth herein to particular embodiments and include variouschanges, equivalents, or replacements for a corresponding embodiment.With regard to the description of the drawings, similar referencenumerals may be used to refer to similar or related elements. It is tobe understood that a singular form of a noun corresponding to an itemmay include one or more of the things, unless the relevant contextclearly indicates otherwise. As used herein, each of such phrases as “Aor B,” “at least one of A and B,” “at least one of A or B,” “A, B, orC,” “at least one of A, B, and C,” and “at least one of A, B, or C,” mayinclude all possible combinations of the items enumerated together in acorresponding one of the phrases. As used herein, such terms as “1st”and “2nd,” or “first” and “second” may be used to simply distinguish acorresponding component from another, and does not limit the componentsin other aspect (e.g., importance or order). It is to be understood thatif an element (e.g., a first element) is referred to, with or withoutthe term “operatively” or “communicatively”, as “coupled with,” “coupledto,” “connected with,” or “connected to” another element (e.g., a secondelement), it means that the element may be coupled with the otherelement directly (e.g., wiredly), wirelessly, or via a third element.

As used herein, the term “module” may include a unit implemented inhardware, software, or firmware, and may interchangeably be used withother terms, for example, “logic,” “logic block,” “part,” or“circuitry”. A module may be a single integral component, or a minimumunit or part thereof, adapted to perform one or more functions. Forexample, according to an embodiment, the module may be implemented in aform of an application-specific integrated circuit (ASIC).

Various embodiments as set forth herein may be implemented as software(e.g., the program 140) including one or more instructions that arestored in a storage medium (e.g., internal memory 136 or external memory138) that is readable by a machine (e.g., the electronic device 101).For example, a processor (e.g., the processor 120) of the machine (e.g.,the electronic device 101) may invoke at least one of the one or moreinstructions stored in the storage medium, and execute it. This allowsthe machine to be operated to perform at least one function according tothe at least one instruction invoked. The one or more instructions mayinclude a code generated by a complier or a code executable by aninterpreter. The machine-readable storage medium may be provided in theform of a non-transitory storage medium. Wherein, the term“non-transitory” simply means that the storage medium is a tangibledevice, and does not include a signal (e.g., an electromagnetic wave),but this term does not differentiate between where data issemi-permanently stored in the storage medium and where the data istemporarily stored in the storage medium.

According to an embodiment, a method according to various embodiments ofthe disclosure may be included and provided in a computer programproduct. The computer program product may be traded as a product betweena seller and a buyer. The computer program product may be distributed inthe form of a machine-readable storage medium (e.g., compact disc readonly memory (CD-ROM)), or be distributed (e.g., downloaded or uploaded)online via an application store (e.g., Play StoreTM), or between twouser devices (e.g., smart phones) directly. If distributed online, atleast part of the computer program product may be temporarily generatedor at least temporarily stored in the machine-readable storage medium,such as memory of the manufacturer’s server, a server of the applicationstore, or a relay server.

According to various embodiments, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities. According to various embodiments, one or more ofthe above-described components or operations may be omitted, or one ormore other components or operations may be added. Alternatively oradditionally, a plurality of components (e.g., modules or programs) maybe integrated into a single component. In such a case, the integratedcomponent may still perform one or more functions of each of theplurality of components in the same or similar manner as they areperformed by a corresponding one of the plurality of components beforethe integration. According to various embodiments, operations performedby the module, the program, or another component may be carried outsequentially, in parallel, repeatedly, or heuristically, or one or moreof the operations may be executed in a different order or omitted, orone or more other operations may be added.

What is claimed is:
 1. A portable communication terminal, comprising: acommunication circuit; at least one processor electrically connected tothe communication circuit; and a memory electrically connected to the atleast one processor, wherein the memory stores instructions configuredto cause the at least one processor, when executed, to: establish acommunication connection with a first electronic device mounted on avehicle through the communication circuit, and based on thecommunication connection, transmit a acquisition instruction to thefirst electronic device for state information of the vehicle.
 2. Theportable communication terminal of claim 1, wherein the stateinformation includes at least one of an identifier for an engine controlunit (ECU) of the vehicle, a firmware version of the ECU of the vehicle,or a safety limit configuration of the vehicle.
 3. The portablecommunication terminal of claim 1, wherein the state informationincludes at least one of the amount of engine oil of the vehicle, abattery life of the vehicle, a battery residual amount of the vehicle, alight state of a lamp of the vehicle, a gear state of the vehicle, or abrake state of the vehicle.
 4. The portable communication terminal ofclaim 2, wherein the safety limit configuration of the vehicleconfigures the vehicle to limit digital media broadcasting (DMB) displaywithin the vehicle, and/or navigation input functions during operationof the vehicle.
 5. The portable communication terminal of claim 1,wherein the instructions are further configured to cause the at leastone processor to: receive abnormal state information of the vehicle fromthe first electronic device through the communication circuit, whereinthe abnormal state information is based on the state informationobtained by the first electronic device from the vehicle based on theacquisition instruction.
 6. The portable communication terminal of claim5, wherein the abnormal information includes information indicating thata state of the vehicle is an abnormal state when information related tothe vehicle stored in the first electronic device does not correspond tothe state information received from the vehicle through thecommunication circuit.
 7. A portable communication terminal, comprising:a communication circuit; at least one processor electrically connectedto the communication circuit; and a memory electrically connected to theat least one processor, wherein the memory stores instructionsconfigured to cause the at least one processor, when executed, to:establish a communication connection with a first electronic devicemounted on a vehicle through the communication circuit, and based on thecommunication connection, transmit a control instruction to the firstelectronic device to control at least one operation of the vehicle. 8.The portable communication terminal of claim 7, wherein the at least oneoperation includes at least one of opening or closing a trunk of thevehicle, applying a brake of the vehicle, or operating an acceleratorpedal of the vehicle.
 9. The portable communication terminal of claim 7,wherein the at least one operation includes at least one of locking orunlocking a door of the vehicle, locking or unlocking a window of thevehicle, activating or deactivating a hazard lamp of the vehicle, oroperating a hom of the vehicle.